import { createRouter, createWebHistory } from 'vue-router'
import Login from "@/views/login/Login.vue";
import Home from "@/views/home/Home.vue";
import Aircraft from "@/views/aircraft/Aircraft.vue";//飞机
import Ship from "@/views/ship/Ship.vue";//船
import Hotel1 from "@/views/hotel/Hotel1.vue";//酒店管理
import Hotel2 from "@/views/hotel/Hotel2.vue";//酒店推荐
import Landscape from "@/views/landscape/Landscape.vue";//景点
import User from "@/views/user/User.vue";//用户管理
import Manager from "@/views/manage/Manager.vue";//管理员管理
import Order from "@/views/order/Order.vue";//订单管理
import Shou from "@/views/shou/Shou.vue";//首页
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login,
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      //重定向
      redirect:'/shou',//默认显示
      children:[
        {
          path: '/aircraft',
          name: 'aircraft',
          component: Aircraft,
        },
        {
          path: '/ship',
          name: 'ship',
          component: Ship,
        },
        {
          path: '/hotel1',
          name: 'hotel1',
          component: Hotel1,
        },
        {
          path: '/hotel2',
          name: 'hotel2',
          component: Hotel2,
        },
        {
          path: '/user',
          name: 'user',
          component: User,
        },
        {
          path: '/manager',
          name: 'manager',
          component: Manager,
        },
        {
          path: '/order',
          name: 'order',
          component: Order,
        },
        {
          path: '/shou',
          name: 'shou',
          component: Shou,
        },
        {
          path: '/landscape',
          name: 'landscape',
          component: Landscape,
        },
      ]
    },
  ],
})


export default router
